package com.maoyu.cloud.role.service;

import com.maoyu.cloud.mybatis.entity.PtRoleEntity;
import com.maoyu.cloud.mybatis.entity.ZtreeEntity;
import com.maoyu.cloud.mybatis.flexigrid.PadingRstType;
import com.maoyu.cloud.mybatis.flexigrid.PagingBean;
import com.maoyu.cloud.role.entity.SearchRoleEntity;

import java.util.List;

public interface RoleService {
    /**
     * 分页查询
     * @param entity
     * @param paging
     * @return
             */
    PadingRstType<PtRoleEntity> queryRoleListByPage(SearchRoleEntity entity, PagingBean paging);

    /**
     * 根据角色id获取菜单ztree列表
     * @param roleUuid
     * @return
     */
    List<ZtreeEntity> queryZtreeByRoleId(String roleUuid);


    /**
     * 保存角色和菜单的对应关系
     * @param menuIdArray
     * @param roleUuidArray
     */
    void saveMenuRefRole(String menuIdArray, String roleUuidArray);

    /**
     * 查询菜单的ztree
     * @return
     */
    List<ZtreeEntity> queryMenuZtreeAll();

    void addroleInfoById(PtRoleEntity entity);

    void deleteRoleById(String roleUuid);

    void updateRoleById(PtRoleEntity entity);

    PtRoleEntity queryRoleById(String roleUuid);
}
